<template>
  <div class="box">
    <div v-if="flag==1">
        <div class="display_flex top_word">
            <p>
                <b>片块总数：</b>
                <span>20</span>
            </p>
            <p>
                <b>抽查复核比例：</b>
                <span>20%</span>
            </p>
            <p>
                <b> 抽取片块数：</b>
                <span>20</span>
            </p>
        </div>
      <div class="display_flex box_search">
        
        <div class="display_flex margin_rignt">
          <p>市级抽查复核片块：</p>
          <div>
            <el-select v-model="value" placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </div>
        </div>
        <div class="display_flex margin_rignt">
          <p>开始时间：</p>
          <div>
            <el-date-picker v-model="value" type="date" placeholder="选择日期"></el-date-picker>
          </div>
        </div>
        <div class="display_flex margin_rignt">
          <p>截止时间：</p>
          <div>
            <el-date-picker v-model="value" type="date" placeholder="选择日期"></el-date-picker>
          </div>
        </div>
        <el-button type="primary">查询</el-button>
      </div>
      <div class="table">
        <el-table :data="tableData" border style="width: 100%">
          <el-table-column type="index" show-overflow-tooltip label="序号" width="60"></el-table-column>
          <el-table-column prop="date" label="权利人"></el-table-column>
          <el-table-column prop="date" label="身份证号"></el-table-column>
          <el-table-column prop="date" label="复核地块"></el-table-column>
          <el-table-column prop="date" label="位置"></el-table-column>
          <el-table-column prop="date" label="	复核时间"></el-table-column>
            <el-table-column prop="date" label="抽查复核结论"></el-table-column>

          <el-table-column label="操作" fixed="right">
            <!--  <template slot-scope="scope"> -->
            <template>
              <el-button size="mini" type="primary" @click="flag=2">查看</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <div class="pages">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="currentPage4"
          :page-sizes="[5, 10, 15, 20]"
          :page-size="100"
          layout="total, sizes, prev, pager, next, jumper"
          :total="400"
        ></el-pagination>
      </div>
    </div>
    <div class="landInfo" v-if="flag==2">
      <div class="back">
        <el-button icon="el-icon-back" size="small" @click="flag=1">返回</el-button>
      </div>
      <div class="title">
        <p class="title_one">莲花村片区片块7-1</p>
        <p class="title_little">
          <span>市级抽查复核时间：2018年8月3日</span>
          
        </p>
      </div>
      <div class="project_position">
        <div class="project_result">
          <div class="display_flex">
            <el-checkbox v-model="checked" disabled>复垦面积与竣工测绘成果是否一致</el-checkbox>
          </div>
          <div class="display_flex">
            <el-checkbox v-model="checked" disabled>复垦位置是否准确</el-checkbox>
          </div>
          <div class="display_flex">
            <el-checkbox v-model="checked" disabled>复垦质量是否达标</el-checkbox>
          </div>
          
        </div>
      </div>
      <div class="project_position">
        <div class="project_title">抽查复核轨迹及位置信息</div>
        <div class="project_img">
          <img src="../../../assets/mapText.png" width="500" height="400" />
        </div>
      </div>
      <div class="project_position">
        <div class="project_title">抽查复核资料</div>
        <div class="project_img">
          <el-table :data="imgArr" border style="width: 100%">
            <el-table-column type="index" show-overflow-tooltip label="序号" width="60"></el-table-column>
            <el-table-column prop="name" label="类型" width="200"></el-table-column>
            <el-table-column label="操作">
              <template slot-scope="scope">
                <el-button size="mini" type="primary" fixed="left" @click="btnSeeImg(scope.row.name)" v-if="scope.row.type==1">查看</el-button>
                <el-button size="mini" type="primary" fixed="left" @click="btnSeeVideo(scope.row.name)" v-if="scope.row.type==2">播放</el-button>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </div>
    </div>

    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="seeImgDialog" width="50%">
      <div class="seeImg">
        <img src="../../../assets/mapText.png" width="80%" height="500" />
        <!-- <img :src="imgPath" width="80%" height="500"> -->
      </div>
    </el-dialog>
    <el-dialog :close-on-click-modal="false" :title="title1" :visible.sync="videoDialog" width="50%">
      <div class="seeImg">
        <video controls width="80%" height="500">
            <source src="xxxxx.mp4" type="video/mp4">
        </video>
        <!-- <img src="../../../assets/mapText.png"  /> -->
        <!-- <img :src="imgPath" width="80%" height="500"> -->
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      checked: true,
      flag: 1,
      options: [
        {
          value: "0",
          label: "全部"
        },
        {
          value: "1",
          label: "莲花村片区片块7-1"
        },
        {
          value: "2",
          label: "莲花村片区片块7-2"
        }
      ],
      value: "",
      tableData: [
        {
          date: "",
          name: "",
          address: ""
        },
        {
          date: "",
          name: "",
          address: ""
        }
      ],
      currentPage4: 4,
      title: "",
      title1:'',
      seeImgDialog: false,
      videoDialog:false,
      imgArr: [
        { name: "抽查复核现场照片1", path: "" ,type:1},
        { name: "抽查复核现场照片2", path: "",type:1 },
        { name: "抽查复核视频", path: "",type:2 },
      ]
    };
  },
  methods: {
    btnSeeImg(title) {
      this.title = title;
      this.seeImgDialog = true;
    },
    btnSeeVideo(title){
        this.title1 = title;
      this.videoDialog = true;
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    }
  }
};
</script>

<style lang="scss" scoped>
.box {
  padding: 30px;
}
.display_flex {
  display: flex;
  align-items: center;
}
.top_word p{
    font-size: 14px;
    margin-bottom:20px;
    margin-right: 30px; 
}
.top_word p b{
    color: #444;
}
.top_word p span{
    font-size: 14px;
    color: #666;
}
.box_search .display_flex p {
  font-size: 14px;
  color: #333333;
}
.margin_rignt {
  margin-right: 30px;
}
.table {
  margin: 20px 0px;
}

.landInfo {
  border: 1px solid #efefef;
  box-sizing: border-box;
}
.back {
  margin: 20px;
}
.title_one {
  text-align: center;
  line-height: 40px;
  font-size: 20px;
  color: #444;
  font-weight: bold;
}
.title_little {
  font-size: 13px;
  color: #999;
  margin: 40px 20px 20px 30px;
}
.title .title_little span {
  margin-right: 30px;
}
.project_title {
  background: #f8f8f8;
  height: 50px;
  background: #f8f8f8;
  padding: 0px 30px;
  line-height: 50px;
  color: #48494d;
  font-size: 14px;
  font-weight: bold;
  border-top: 1px solid #efefef;
  border-bottom: 1px solid #efefef;
}
.project_img {
  padding: 30px;
}
.seeImg {
  text-align: center;
}
.project_result {
  padding: 30px;
}
.project_result .display_flex {
  margin-bottom: 20px;
  font-size: 13px;
  color: #444;
  width: 180px;
}
.pages{
  text-align: center;
}
</style>